home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / getgroups.z / getgroups
Encoding:
Text File  |  1998-10-20  |  3.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ggggeeeettttggggrrrroooouuuuppppssss((((2222))))                                                      ggggeeeettttggggrrrroooouuuuppppssss((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _gggg_eeee_tttt_gggg_rrrr_oooo_uuuu_pppp_ssss - get supplementary group access list IDs
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  13.  
  14.      iiiinnnntttt nnnnggggrrrrppppssss;;;;
  15.  
  16.    _P_O_S_I_X:
  17.      nnnnggggrrrrppppssss ==== ggggeeeettttggggrrrroooouuuuppppssss((((iiiinnnntttt sssseeeettttlllleeeennnn,,,, ggggiiiidddd____tttt ****ggggiiiiddddsssseeeetttt))));;;;
  18.  
  19.    _B_S_D:
  20.      nnnnggggrrrrppppssss ==== ggggeeeettttggggrrrroooouuuuppppssss((((iiiinnnntttt sssseeeettttlllleeeennnn,,,, iiiinnnntttt ****ggggiiiiddddsssseeeetttt))));;;;
  21.  
  22.      To use the BSD version of _g_e_t_g_r_o_u_p_s one must either
  23.  
  24.      1) explicitly invoke it as _B_S_D_g_e_t_g_r_o_u_p_s or
  25.  
  26.      2) link with the libbsd.a library:
  27.  
  28.           cc -o prog prog.c -lbsd
  29.  
  30.  
  31. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  32.      _g_e_t_g_r_o_u_p_s retrieves the current group access list of the user process and
  33.      stores it in the array _g_i_d_s_e_t.  The parameter _s_e_t_l_e_n indicates the number
  34.      of entries that may be placed in _g_i_d_s_e_t.  The return value is the actual
  35.      number of groups placed in _g_i_d_s_e_t, and this will never be greater than
  36.      NNNNGGGGRRRROOOOUUUUPPPPSSSS____UUUUMMMMAAAAXXXX for the POSIX version, and NNNNGGGGRRRROOOOUUUUPPPPSSSS for the BSD version, as
  37.      defined in <_s_y_s/_p_a_r_a_m._h>.
  38.  
  39.      As a special case, if the _s_e_t_l_e_n parameter is zero, _g_e_t_g_r_o_u_p_s returns the
  40.      number of supplemental group IDs associated with the calling process
  41.      without modifying the array pointed to by the _g_i_d_s_e_t argument.
  42.  
  43. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  44.      A successful call returns the number of groups in the group set.  A value
  45.      of -1 indicates that an error occurred, and the error code is stored in
  46.      the global variable _e_r_r_n_o.
  47.  
  48. EEEERRRRRRRROOOORRRRSSSS
  49.      The possible errors for _g_e_t_g_r_o_u_p_s are:
  50.  
  51.      [EINVAL]       The argument _s_e_t_l_e_n is smaller than the number of groups
  52.                     in the group set.
  53.  
  54.      [EFAULT]       The argument _g_i_d_s_e_t specifies an invalid address.
  55.  
  56. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  57.      multgrps(1), setgroups(2), initgroups(3)
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggeeeettttggggrrrroooouuuuppppssss((((2222))))                                                      ggggeeeettttggggrrrroooouuuuppppssss((((2222))))
  71.  
  72.  
  73.  
  74. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  75.      The POSIX and 4.3BSD versions differ in the types of their _g_i_d_s_e_t
  76.      parameter.
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.